package com.nami.store.biz.user.convert;

import com.nami.store.api.bo.UserWrap;
import com.nami.store.api.request.user.UserAddRequest;
import com.nami.store.api.response.user.UserDTO;
import com.nami.store.domain.UserDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 用户convert
 *
 * @author lbc@test.com
 * @since 1.0.0 2022-11-29
 */
@Mapper
public interface UserConvert {

    UserConvert INSTANCE = Mappers.getMapper(UserConvert.class);

    /**
     * user convert
     *
     * @param user
     * @return
     */
    UserDTO convert(UserDO user);

    /**
     * list convert
     *
     * @param list
     * @return
     */
    List<UserDTO> convertList(List<UserDO> list);

    /**
     * user convert
     *
     * @param user
     * @return
     */
    UserDO convert2(UserAddRequest user);


    List<UserDO> convertList2(List<UserAddRequest> list);

    /**
     * clone
     *
     * @param userWrap
     * @return
     */
    UserWrap convert3(UserWrap userWrap);
}






















